﻿
namespace SwtorCalculator {
    using System;
    using System.Windows;
    using System.Windows.Input;

    /// <summary>
    /// Interaction logic for CalcForm.xaml
    /// </summary>
    public partial class CalcForm : Window {
        /// <summary>
        /// CalcForm no-arg constructor
        /// </summary>
        public CalcForm() {
            InitializeComponent();
        }

        private void Window_Loaded( object sender, RoutedEventArgs e ) {
            //this.Width = 1;
            //DoubleAnimation da = new DoubleAnimation();
            //Storyboard sb = new Storyboard();
            //da.From = 1;
            //da.To = 550;
            //da.Duration = new Duration( TimeSpan.FromSeconds( 4 ) );
            //sb.Children.Add( da );
            //Storyboard.SetTargetName( da, this.Name );
            //Storyboard.SetTargetProperty( da, new PropertyPath( this.Width ) ); // "(Width)"
            //sb.Begin( this );
        }

        private void button1_Click( object sender, RoutedEventArgs e ) {
            this.Close();
        }

        private void Window_MouseLeftButtonDown( object sender, MouseButtonEventArgs e ) {
            try {
                this.DragMove();
            }
            // This type of error gets thrown everytime the 'Go Back' button is hit and then you return to the main window
            // I'll fix it eventually
            catch( InvalidOperationException ex ) { }
        }

        private void label1_MouseLeftButtonDown( object sender, MouseButtonEventArgs e ) {
            CalcPane.Visibility = Visibility.Visible;
        }

        private void DoubleAnimation_Completed( object sender, EventArgs e ) {

        }
    }
}
